package business

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type InvitationRouter struct {
}

// InitInvitationRouter 初始化 邀请 路由信息
func (s *InvitationRouter) InitInvitationRouter(Router *gin.RouterGroup) {
	invitationRouter := Router.Group("invitation").Use(middleware.OperationRecord())
	invitationRouterWithoutRecord := Router.Group("invitation")
	var invitationApi = v1.ApiGroupApp.BusinessApiGroup.InvitationApi
	{
		invitationRouter.POST("createInvitation", invitationApi.CreateInvitation)             // 新建邀请
		invitationRouter.DELETE("deleteInvitation", invitationApi.DeleteInvitation)           // 删除邀请
		invitationRouter.DELETE("deleteInvitationByIds", invitationApi.DeleteInvitationByIds) // 批量删除邀请
		invitationRouter.PUT("updateInvitation", invitationApi.UpdateInvitation)              // 更新邀请
		invitationRouter.POST("invitationUpExcel", invitationApi.InvitationUpExcel)           //excel
	}
	{
		invitationRouterWithoutRecord.GET("findInvitation", invitationApi.FindInvitation)       // 根据ID获取邀请
		invitationRouterWithoutRecord.GET("getInvitationList", invitationApi.GetInvitationList) // 获取邀请列表
	}
}
